import request from "@/utils/request";

export async function fetchLogin(params: any) {
  const res = await request.post('/admin/login', {
    username: params.username,
    password: params.password
  });
  console.log('1111',res)
  if (res.code !== 200) {
    throw new Error(res.msg || '登录失败');
  }
  return res;
}
